﻿namespace Utilities
{
    internal static class DiagnosticLog
    {
        public static void TraceInformation(string s)
        {
#if MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_2
            Microsoft.SPOT.Debug.Print("INFO : " + s);
#else
            System.Diagnostics.Trace.TraceInformation(s);
#endif
        }

        public static void TraceError(string s)
        {
#if MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_2
            Microsoft.SPOT.Debug.Print("ERROR : " + s);
#else
            System.Diagnostics.Trace.TraceError(s);
#endif
        }

        public static void TraceWarning(string s)
        {
#if MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_2
            Microsoft.SPOT.Debug.Print("WARNING : " + s);
#else
            System.Diagnostics.Trace.TraceWarning(s);
#endif
        }

        public static void Trace(string s)
        {
#if MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_2
            Microsoft.SPOT.Debug.Print(s);
#else
            System.Diagnostics.Trace.WriteLine(s);
#endif
        }
    }
}